<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看帖子</title>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>

<link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="js/layui.css">
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript" src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/showGameChatpost.css">
</head>
<body>
 <div id="body03">
   <nav class="navbar navbar-inverse" role="navigation">
    ...
   </nav>
   <div id="replyHead">
       <p align="center" style="font-size:18px;"> <a href="showGameChat?gid=${gameId }" style="color:red;letter-spacing:7px">${gameName}</a>  </p>
   </div>
   <hr color="gray">
   <div id="daohang" style="padding-left:20px">
   
        <p style="font-size:16px;margin-top:48px;"> <a href="html/ChatIndex.jsp" class="layui-btn layui-btn-danger" style="letter-spacing:5px;">返回首页</a> </p>
        <p style="font-size:16px"><a href="javascrip:void(0)" class="layui-btn layui-btn-disabled">热门游戏快速连接:</a></p>
      <ul type="none" style="margin-right:20px;" id="ul01">
         <li></li>
         <li>   <a href="showGameChat?gid=2" class="layui-btn layui-btn-normal">英雄联盟</a>   </li>
         <li>   <a href="showGameChat?gid=1" class="layui-btn layui-btn-normal">炉石传说</a>  </li>
         <li>   <a href="showGameChat?gid=6" class="layui-btn layui-btn-normal">绝地求生</a>  </li>
         <li>   <a href="showGameChat?gid=1" class="layui-btn layui-btn-normal">贪玩蓝月</a>   </li>
      </ul>
   
   </div>
   <div id="reply">     
   <span id="postTitle01">${postTitle }</span> <span></span>
     <table id="table01">
      <%-- <tr><td id="td1"></td><td id="td2"><span id="postTitle01">${postTitle } </span> <br></td></tr> --%>
      <tr><td id="td1"><span style="margin-left:10px;">楼主：${uname}</span> <br>
     <%-- <c:if test="${photo !=null }"></c:if> --%>  <img src="${photo }" id="img1"></img>      
      </td>   
       <td id="td2"><p id="postContent01">&nbsp;&nbsp;&nbsp;&nbsp;${postContent}</p>
        <c:if test="${postPicture!=null and postPicture!=''}">
       <img src="${postPicture }" style="width:150px;height:150px;margin-left:30px">
       </c:if> 
       
       </td></tr>    
    </table>
   <div id="replyContent">
      <c:forEach items="${chatReplyList }" var="crli">
      <table id="table01">
       <tr style="padding-top:10px"><td  id="td1"><span id="uname01">${crli.user.uname}</span> <br><img src="${crli.user.photo }" id="img1"></img></td><td id="td2"><p id="postContent01">&nbsp;&nbsp;&nbsp;&nbsp;${crli.replyTontent }</p></td></tr>  
       <c:if test="${crli.replyPicture !=null}">
       <tr><td></td><td> <img src="images/${crli.replyPicture }" style="width:150px;height:150px;margin-left:30px;"></td></tr>
       </c:if>
       <tr><td></td><td><span style="text-align:right;"> ${crli.replyTime } </span></td></tr>
      </table>
      </c:forEach> 
      
       <!-- postId=${li.postId }&postTitle=${li.postTitle}&postContent=${li.postContent}
       &gameName=${gameName}&gameid=${gameid}&uname=${li.user.uname}&photo=${li.user.photo} -->
      
      <ul class="pagination">
      <c:if test="${pages >1 }">
  <li><a href="chatContent?postId=${postId }&postTitle=${postTitle }&postContent=${postContent }&gameName=${gameName }&gameId=${gameId}&uname=${uname}&photo=${photo}&currentPage=1">首页</a></li>
  
  <c:if test="${curr != 1}">
  <li><a href="chatContent?postId=${postId }&postTitle=${postTitle }&postContent=${postContent }&gameName=${gameName }&gameId=${gameId}&uname=${uname}&photo=${photo}&currentPage=${curr-1}">&laquo;</a></li>
  </c:if>

  <c:if test="${curr !=pages }">
  <li><a href="chatContent?postId=${postId }&postTitle=${postTitle }&postContent=${postContent }&gameName=${gameName }&gameId=${gameId}&uname=${uname}&photo=${photo}&currentPage=${curr+1}">&raquo;</a></li>
  </c:if>
  
  <li><a href="chatContent?postId=${postId }&postTitle=${postTitle }&postContent=${postContent }&gameName=${gameName }&gameId=${gameId}&uname=${uname}&photo=${photo}&currentPage=${pages}">末页</a></li>
       </c:if> 
</ul>
    
    <form action="addPostReply.do" style="float:right;width:900px;" method="post" enctype="multipart/form-data">
   <div class="layui-form-item">
    <label class="layui-form-label"></label>
    <div class="layui-input-block">
    <input type="hidden" value="${gameid }" name="gameid">
    <input type="hidden" value="3" name="uid">   <!-- 设置发帖人的Id -->
    <input type="hidden" value="${gameName }" name="gameName">    
    <input type="hidden" value="${postTitle }" name="postTitle">
    <input type="hidden" value="${postPicture }" name="postPicture">
    <input type="hidden" value="${uname}" name="uname">
    <input type="hidden" value="${postId}" name="postId">
    <input type="hidden" value="${postContent }" name="postContent  ">
    </div>
   </div>
  
  <div class="layui-form-item layui-form-text" style="margin-top:-10px">
    <label class="layui-form-label"></label>
    <div class="layui-input-block">
      <textarea placeholder="请输入内容" class="layui-textarea" name="replyTontent" ></textarea>
    </div>
  </div> 
 
  <div class="layui-form-item">
    <div class="layui-input-block">  
     <input type="file" name="image" class="layui-input">  
      <input class="layui-btn" type="submit" lay-filter="demo1" value="发表">
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>     
   </div>
    
    
  
    
   </div>
   
   
   
   
 </div>
</body>
</html>